# # -*- coding: utf-8 -*-
# from datetime import timedelta
# from utils.operators.spark_sql_operator import SparkSqlOperator
# from jms.dwd.oms.dwd_oms_order_dt import jms_dwd__dwd_oms_order_dt
# from jms.ods.tab.tab_statistics import jms_ods__tab_statistics
# from jms.ods.tab.tab_end_piece import jms_ods__tab_end_piece
# from jms.ods.oms.yl_oms_interceptorpiece import jms_ods__yl_oms_interceptorpiece
# from jms.ods.tms.yl_tms_branch_time_effective import jms_ods__yl_tms_branch_time_effective
# from jms.ods.lmdm.yl_lmdm_sys_network_expand import jms_ods__yl_lmdm_sys_network_expand
# from jms.dwd.oms.dwd_oms_waybill_dt import jms_dwd__dwd_oms_waybill_dt
# from jms.dm.dm_waybill_trace_dt import jms_dm__dm_waybill_trace_dt
# from jms.ods.lmdm.yl_lmdm_sys_network_distributi import jms_ods__yl_lmdm_sys_network_distributi
#
# jms_dm__dm_waybill_collect_aging_dt = SparkSqlOperator(
#     task_id='jms_dm__dm_waybill_collect_aging_dt',
#     email='songjun@yl-scm.com',
#     name='jms_dm__dm_waybill_collect_aging_dt_{{ execution_date | cst_ds_nodash }}',
#     sql='jms/dm/dm_waybill_collect_aging_dt/execute.hql',
#     pool_slots=10,
#     executor_cores=3,
#     executor_memory='8G',
#     driver_memory='6G',
#     num_executors=2,  # spark.dynamicAllocation.enabled 为 True 时，num_executors 表示最少 Executor 数
#     conf={'spark.dynamicAllocation.enabled': 'true',  # 动态资源开启
#           'spark.shuffle.service.enabled': 'true',  # 动态资源 Shuffle 服务开启
#           'spark.dynamicAllocation.maxExecutors': 40,  # 动态资源最大扩容 Executor 数
#           'spark.dynamicAllocation.cachedExecutorIdleTimeout': 60,  # 动态资源自动释放闲置 Executor 的超时时间(s)
#           'spark.executor.memoryOverhead': '2G',  # 堆外内存
#           'spark.sql.autoBroadcastJoinThreshold': 104857600,  # MapJoin 阈值 100M
#           'spark.sql.shuffle.partitions': 300,
#           },
#     yarn_queue='pro',
#     execution_timeout=timedelta(minutes=60),
# )
#
# jms_dm__dm_waybill_collect_aging_dt << [jms_dwd__dwd_oms_waybill_dt,
#                                         jms_dwd__dwd_oms_order_dt,
#                                         jms_ods__tab_statistics,
#                                         jms_ods__yl_tms_branch_time_effective,
#                                         jms_ods__yl_lmdm_sys_network_expand,
#                                         jms_ods__yl_lmdm_sys_network_distributi,
#                                         jms_ods__tab_end_piece,
#                                         jms_ods__yl_oms_interceptorpiece,
#                                         jms_dm__dm_waybill_trace_dt, ]
